import Main from '@/views/main.vue';
import IFrame from '@/components/IFrame'
import ChildView from '@/components/ChildView'

export default [


    // 商品
    {
        path: '/mall/goods',
        name: 'mall_goods',
        meta: {
            icon: 'el-icon-menu',
            title: '商品',
            access: ['mall:goods:page']
        },
        component: Main,
        children: [
            {
                path: 'goods',
                name: 'goods',
                meta: {
                    icon: 'el-icon-menu',
                    title: '商品管理',
                    access: ['mall:goods:page:page']
                },
                component: () => import('@/views/mall/pmsspu/index.vue')
            },
            {
                path: 'goods_form',
                name: 'goods_form',
                meta: {
                    title: '发布商品',
                    hideInMenu: true
                },
                component: () => import('@/views/mall/pmsspu/add-or-update-page')
            },
            // {
            //     path: 'category',
            //     name: 'category',
            //     meta: {
            //         icon: 'el-icon-menu',
            //         title: '分类管理',
            //         access: ['system:role:page']
            //     },
            //     component: () => import('@/views/mall/pmscategory/index.vue')
            // },
            // {
            //     path: 'brand',
            //     name: 'brand',
            //     meta: {
            //         icon: 'el-icon-menu',
            //         title: '品牌管理',
            //         access: ['system:permission:page']
            //     },
            //     component: () => import('@/views/mall/pmsbrand/index.vue')
            // },
            // {
            //     path: 'comment',
            //     name: 'comment',
            //     meta: {
            //         icon: 'el-icon-menu',
            //         title: '商品评论',
            //         access: ['system:dict:page']
            //     },
            //     component: () => import('@/views/mall/pmsspucomment/index.vue')
            // },
            // {
            //     path: 'attr_group',
            //     name: 'attr_group',
            //     meta: {
            //         icon: 'el-icon-menu',
            //         title: '属性分组',
            //         access: ['system:dict:page']
            //     },
            //     component: () => import('@/views/mall/pmsattrgroup/index.vue')
            // },
            // {
            //     path: 'base_attr',
            //     name: 'base_attr',
            //     meta: {
            //         icon: 'el-icon-menu',
            //         title: '规格管理',
            //         access: ['system:dict:page']
            //     },
            //     component: () => import('@/views/mall/pmsattr/base_attr.vue')
            // },


            // {
            //     path: 'sale_attr',
            //     name: 'sale_attr',
            //     meta: {
            //         icon: 'el-icon-menu',
            //         title: '销售属性',
            //         access: ['system:dict:page']
            //     },
            //     component: () => import('@/views/mall/pmsattr/sale_attr.vue')
            // }
        ]
    },

    // 订单
    {
        path: '/mall/order',
        name: 'mall_order',
        meta: {
            icon: 'el-icon-menu',
            title: '订单',
            access: ['mall:order:page']
        },
        component: Main,
        children: [

            {
                path: 'order_list',
                name: 'order_list',
                meta: {
                    icon: 'el-icon-menu',
                    title: '订单列表',
                    access: ['mall:order_list:page']
                },
                component: () => import('@/views/mall/omsorder/index.vue')
            },
            {
                path: 'order_return',
                name: 'order_return',
                meta: {
                    icon: 'el-icon-menu',
                    title: ' 退款售后',
                    access: ['mall:order_return:page']
                },
                component: () => import('@/views/mall/omsorderreturnapply/index.vue')
            }
        ]
    },

    // 会员
    {
        path: '/mall/member',
        name: 'mall_member',
        meta: {
            icon: 'el-icon-menu',
            title: '会员',
            access: ['mall:member:page']
        },
        component: Main,
        children: [
            {
                path: 'member',
                name: 'member',
                meta: {
                    icon: 'el-icon-menu',
                    title: '会员管理',
                    access: ['mall:member:page:page']
                },
                component: () => import('@/views/mall/umsmember/index.vue')
            },
            {
                path: 'level',
                name: 'level',
                meta: {
                    icon: 'el-icon-menu',
                    title: '会员等级',
                    access: ['mall:member:level:page']
                },
                component: () => import('@/views/mall/umsmemberlevel/index.vue')
            },
            {
                path: 'distribution_apply',
                name: 'distribution_apply',
                meta: {
                    icon: 'el-icon-menu',
                    title: '分销申请',
                    access: ['mall:member:distribution_apply:page']
                },
                component: () => import('@/views/mall/umsmemberdistributionapply/index.vue')
            },
            {
                path: 'address',
                name: 'address',
                meta: {
                    icon: 'el-icon-menu',
                    title: '收货地址',
                    access: ['mall:member:address:page']
                },
                component: () => import('@/views/mall/umsmemberreceiveaddress/index.vue')
            },
            {
                path: 'umscoupon',
                name: 'umscoupon',
                meta: {
                    icon: 'el-icon-menu',
                    title: '优惠券',
                    access: ['mall:member:umscoupon:page']
                },
                component: () => import('@/views/mall/umscoupon/index.vue')
            },
            // {
            //     path: 'member_login_log',
            //     name: 'member_login_log',
            //     meta: {
            //         icon: 'el-icon-menu',
            //         title: '登录日志',
            //         access: ['system:syslog_login:page']
            //     },
            //     component: () => import('@/views/mall/umsmemberloginlog/index.vue')
            // },
        ]
    },

    // 营销
    // {
    //     path: '/mall/sale',
    //     name: 'mall_sale',
    //     meta: {
    //         icon: 'el-icon-menu',
    //         title: '营销',
    //         access: ['system:page']
    //     },
    //     component: Main,
    //     children: [
    //         {
    //             path: 'coupon',
    //             name: 'coupon',
    //             meta: {
    //                 icon: 'el-icon-menu',
    //                 title: ' 优惠券',
    //                 access: ['system:syslog_login:page']
    //             },
    //             component: () => import('@/views/system/syslog/login_log.vue')
    //         },
    //         {
    //             path: 'integral',
    //             name: 'integral',
    //             meta: {
    //                 icon: 'el-icon-menu',
    //                 title: '积分抵扣',
    //                 access: ['system:online:page']
    //             },
    //             component: () => import('@/views/system/online/index.vue')
    //         },
    //         {
    //             path: 'region',
    //             name: 'region',
    //             meta: {
    //                 icon: 'el-icon-menu',
    //                 title: ' 专区活动',
    //                 access: ['system:syslog_login:page']
    //             },
    //             component: () => import('@/views/system/syslog/login_log.vue')
    //         }
    //     ]
    // },

    // 财务
    {
        path: '/mall/finance',
        name: 'mall_finance',
        meta: {
            icon: 'el-icon-menu',
            title: '财务',
            access: ['mall:finance:page']
        },
        component: Main,
        children: [
            {
                path: 'finance',
                name: 'finance',
                meta: {
                    icon: 'el-icon-menu',
                    title: '财务管理',
                    access: ['mall:finance:page:page']
                },
                component: () => import('@/views/mall/fmsfinance/index.vue')
            },
            {
                path: 'commision',
                name: 'commision',
                meta: {
                    icon: 'el-icon-menu',
                    title: '佣金管理',
                    access: ['mall:finance:commision:page']
                },
                component: () => import('@/views/mall/fmscommision/index.vue')
            },
            {
                path: 'reportcommision',
                name: 'reportcommision',
                meta: {
                    icon: 'el-icon-menu',
                    title: '分成报表',
                    access: ['mall:finance:reportcommision:page']
                },
                component: () => import('@/views/mall/fmsreportcommision/index.vue')
            }
        ]
    },

     // 仓储库存
     {
        path: '/mall/wms',
        name: 'mall_wms',
        meta: {
            icon: 'el-icon-menu',
            title: '代理商',
            access: ['mall:wms:page']
        },
        component: Main,
        children: [
            {
                path: 'agent',
                name: 'agent',
                meta: {
                    icon: 'el-icon-menu',
                    title: '代理商',
                    access: ['mall:wms:agent:page']
                },
                component: () => import('@/views/mall/wmsagentinfo/index.vue')
            },
            {
                path: 'ware_sku',
                name: 'ware_sku',
                meta: {
                    icon: 'el-icon-menu',
                    title: '商品库存',
                    access: ['mall:wms:ware_sku:page']
                },
                component: () => import('@/views/mall/wmswaresku/index.vue')
            }
        ]
    },

    // 商场设置
    {
        path: '/mall/settings',
        name: 'mall_settings',
        meta: {
            icon: 'el-icon-menu',
            title: '商场设置',
            access: ['mall:mall_settings:page']
        },
        component: Main,
        children: [
            {
                path: 'advertise',
                name: 'advertise',
                meta: {
                    icon: 'el-icon-menu',
                    title: '广告管理',
                    access: ['mall:mall_settings:advertise:page']
                },
                component: () => import('@/views/mall/malladvertise/index.vue')
            },
            {
                path: 'advertise_items',
                name: 'advertise_items',
                meta: {
                    title: '广告列表',
                    hideInMenu: true
                },
                component: () => import('@/views/mall/malladvertiseitem/index.vue')
            },
            {
                path: 'return_reason',
                name: 'return_reason',
                meta: {
                    icon: 'el-icon-menu',
                    title: '退货申请原因',
                    access: ['mall:mall_settings:return_reason:page']
                },
                component: () => import('@/views/mall/omsorderreturnreason/index.vue')
            },
            {
                path: 'delivery_address',
                name: 'delivery_address',
                meta: {
                    icon: 'el-icon-menu',
                    title: '商家收货地址',
                    access: ['mall:mall_settings:delivery_address:page']
                },
                component: () => import('@/views/mall/malldeliveryaddress/index.vue')
            },
            {
                path: 'express_company',
                name: 'express_company',
                meta: {
                    icon: 'el-icon-menu',
                    title: '快递公司管理',
                    access: ['mall:mall_settings:express_company:page']
                },
                component: () => import('@/views/mall/mallexpresscompany/index.vue')
            }

        ]
    }

];
